package m3d30;

import java.io.FileInputStream;
import java.io.IOException;

//InputStream抽象类是字节输入类的超类
public class oInputStream {
    public static void main(String[] args) throws IOException {
        //创建对象，  字节输入流
        FileInputStream fis = new FileInputStream("D:\\ideaproject\\basicproject\\day02\\src\\m3d30\\n.txt");

        //读取文件
        //读取到末尾返回-1
        int len1 = fis.read();
        System.out.println(len1);

        int len2;
        while ((len2 = fis.read())!=-1){
            System.out.println((char)len2);
        }

        fis.close();
    }
}
